<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/1/7
 * Time: 23:35
 */
namespace app\index\controller;


use app\index\logic\WarehouseLogic;
use app\BaseController;
use app\model\User;
use think\App;

class Warehouse extends BaseController
{
    public function __construct(App $app)
    {
    }

    /*
     * 列表
     */
    public function index()
    {
        $logic = new WarehouseLogic();
        success($logic->getList());
    }

    public function update()
    {
        if(!position(User::CLEANING_CHARGE))    fail('暂无权限');
        $logic = new WarehouseLogic();
        success($logic->update());
    }
}